# make a list of unit test files
set(test_list
	test_circle.cpp
	test_moon.cpp
	test_recthole.cpp
	test_square.cpp
	test_perimeter.cpp
	test_ellipse.cpp
)

# walk over source files
foreach(srcfile ${test_list})
	string(REPLACE ".cpp" "" name ${srcfile})
	add_executable(${name} ${srcfile})
	target_link_libraries(${name} Rat::Dmsh)
	add_test(${name} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name})
endforeach()